package com.jida.tijian.dto;

/**
 * 统一后端返回给前端的数据类型
 */
public class ResponseObject<T> {

    //信号
    private Integer status;
    //提示信息
    private String desc;
    //前端想要的结果
    T data;

    //通用操作：成功
    public   static final Integer SUCCESS_STATUS = 200;
    public static final String SUCCESS_DESC = "成功";


    public ResponseObject(Integer status, T data, String desc) {
        this.status = status;
        this.data = data;
        this.desc = desc;
    }

    public ResponseObject(Integer status, String desc) {
        this.status = status;
        this.desc = desc;
    }

    public Integer getStatus() {
        return status;
    }

    public void setStatus(Integer status) {
        this.status = status;
    }

    public T getData() {
        return data;
    }

    public void setData(T data) {
        this.data = data;
    }

    public String getDesc() {
        return desc;
    }

    public void setDesc(String desc) {
        this.desc = desc;
    }



    //失败需要明确失败原因

}
